/**
 * Place holder for copyright, needs to be replaced before release.
 */
package com.softao.ming.gwt.internal.osgi;

import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;

/**
 * Plugin implementation for normal Java Plugin.
 */
public class JMingGwtOsgiPlugin extends Plugin {

	// The shared instance
	private static JMingGwtOsgiPlugin plugin;
	
	/**
	 * The constructor
	 */
	public JMingGwtOsgiPlugin() {
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		super.start(context);
		plugin = this;
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
		plugin = null;
		super.stop(context);
	}

	/**
	 * Returns the shared instance
	 *
	 * @return the shared instance
	 */
	public static JMingGwtOsgiPlugin getDefault() {
		return plugin;
	}
}
